package itheima.d01;

import java.time.Duration;
import java.time.LocalDateTime;

public class Test2 {
    public static void main(String[] args) {
        LocalDateTime start=LocalDateTime.of(2020,1,5,10,20,30);
        LocalDateTime end=LocalDateTime.of(2022,1,5,10,20,40);

        Duration d=Duration.between(start,end);
        System.out.println(d.toDays());
        System.out.println(d.toHours());
        System.out.println(d.toMinutes());
        System.out.println(d.toSeconds());
        System.out.println(d.toMillis());
        System.out.println(d.toNanos());

    }
}
